package com.usdt;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * 启动程序
 * 
 * @author ruoyi
 */
@SpringBootApplication(scanBasePackages = "com.usdt",exclude = { DataSourceAutoConfiguration.class})
@MapperScan("com.usdt.*.mapper")
@EnableTransactionManagement
@EnableAsync
public class RuoYiApplication
{
	
    static {
        // 解决Linux下字体问题
        System.setProperty("java.awt.headless", "true");
        System.setProperty("fontconfig.configuration", "/dev/null");
        
        try {
            // 强制加载字体配置
            Class.forName("sun.font.FontConfigManager");
            java.lang.reflect.Method method = Class.forName("sun.awt.FontConfiguration")
                    .getDeclaredMethod("createFontConfiguration");
            method.setAccessible(true);
            method.invoke(null);
        } catch (Exception e) {
            // 忽略初始化错误
        }
    }
    
    public static void main(String[] args)
    {
        // System.setProperty("spring.devtools.restart.enabled", "false");
    	System.setProperty("es.set.netty.runtime.available.processors", "false");
        
        SpringApplication.run(RuoYiApplication.class, args);
    }
}
